package de.preisrobot.service;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import de.preiscrawler.parser.BilligerParser;

public class ServiceFactory {
	
	static ApplicationContext appContext;
	static{
		 appContext = new ClassPathXmlApplicationContext(
		"classpath*:applicationContext.xml");
	}

	public static GrabberService getBilligerCrawler()
	{
		GrabberService service =(GrabberService) appContext.getBean("amazonGrabberService");
		service.setParser(new BilligerParser());
		
		return service;
	}
}
